package org.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.example.entity.GameRecord;
import org.apache.ibatis.annotations.Insert;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface GameRecordMapper extends BaseMapper<GameRecord> {
    @Insert("INSERT INTO game_record (username, board_data, current_player) VALUES (#{username}, #{boardData}, #{currentPlayer})")
    void insertGameRecord(GameRecord gameRecord);

    List<GameRecord> getAllGameRecords();
}